// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   TrustStoreInfo.java

package org.quickserver.util.xmlreader;

import java.io.Serializable;

public class TrustStoreInfo
    implements Serializable
{

    public TrustStoreInfo()
    {
        storeFile = "NONE";
        storePassword = null;
        type = null;
        provider = null;
    }

    public void setStoreFile(String storeFile)
    {
        if(storeFile != null && storeFile.trim().length() != 0)
            this.storeFile = storeFile;
    }

    public String getStoreFile()
    {
        return storeFile;
    }

    public void setStorePassword(String storePassword)
    {
        if(storePassword != null)
            this.storePassword = storePassword;
    }

    public String getStorePassword()
    {
        return storePassword;
    }

    public void setType(String type)
    {
        if(type != null && type.trim().length() != 0)
            this.type = type;
    }

    public String getType()
    {
        return type;
    }

    public void setProvider(String provider)
    {
        if(provider != null && provider.trim().length() != 0)
            this.provider = provider;
    }

    public String getProvider()
    {
        return provider;
    }

    public String toXML(String pad)
    {
        if(pad == null)
            pad = "";
        StringBuilder sb = new StringBuilder();
        sb.append(pad).append("<trust-store-info>\n");
        sb.append(pad).append("\t<store-file>").append(getStoreFile()).append("</store-file>\n");
        if(getStorePassword() != null)
            sb.append(pad).append("\t<store-password>").append(getStorePassword()).append("</store-password>\n");
        else
            sb.append(pad).append("\t</store-password>\n");
        if(getType() != null)
            sb.append(pad).append("\t<type>").append(getType()).append("</type>\n");
        if(getProvider() != null)
            sb.append(pad).append("\t<provider>").append(getProvider()).append("</provider>\n");
        sb.append(pad).append("</trust-store-info>\n");
        return sb.toString();
    }

    private String storeFile;
    private String storePassword;
    private String type;
    private String provider;
}
